{template /common/header} 

<script type="text/javascript" src="{THEME_PATH}js/jquery_Validform.js"></script> 
<script type="text/javascript" src="{THEME_PATH}js/Validform_Datatype.js"></script> 
<script type="text/javascript" src="{THEME_PATH}js/okarea.js"></script> 
<script>var ajaxurl = "{U('Address/getArea')}";</script>
<div class="app_body">
  <div class="app_gerenInfo">
    <p>尊敬的{$userInfoList[username]}，请您完善更多商家信息，有助于我们为您提供更加个性化的服务；我们承诺将尊重并保护您的隐私。</p>
    <form name="form1" action="{U('user/userInfocompany')}" method="post" class="secuform">
      <table>
        <tr>
          <td class="tdAlignRight tdWidth1">用户名：</td>
          <td>{$userInfoList[username]}</td>
        </tr>
        <tr>
          <td class="tdAlignRight">企业名称：</td>
          <td class="cityTd"><input type="text" name="compayname" id="compayname" value="{$userInfoList[compayname]}" class="textStyle"  datatype="*"   nullmsg="请输入企业名称" errormsg="请输入企业名称！"/></td>
        </tr>
        <tr>
          <td class="tdAlignRight">企业编号：</td>
          <td><input type="text" name="compayid" id="compayid" value="{$userInfoList[compayid]}" class="textStyle"  datatype="*"   nullmsg="请输入营业执照编号" errormsg="请输入营业执照编号！"/></td>
        </tr>
        <tr>
          <td class="tdAlignRight">邮箱：</td>
          <td><input type="text" name="compaycounent" id="compaycounent" value="{$userInfoList[compaycounent]}" class="textStyle"  datatype="*"   nullmsg="请输入联系人" errormsg="请输入联系人"/></td>
        </tr>
        <tr>
          <td class="tdAlignRight">联系电话：</td>
          <td>{$userInfoList[mobile_phone]}
            <input type="hidden" name="mobile_phone" id="mobile_phone" value="{$userInfoList[mobile_phone]}" class="textStyle" /></td>
        </tr>
        <tr>
          <td class="tdAlignRight">所在地区：</td>
          <td><select name="province" id="province" onChange="loadArea(this.value, 'city')" style="height:30px; border:1px solid ">
              <option value="-1" selected>--请选择省份--</option>
              <?php
                        foreach($region as $v){
						?>
              <option value="<?php echo $v["area_id"]?>" <?php if($userInfoList["province"]==$v["area_id"]){?> selected="selected"<?php }?>><?php echo $v["area_name"]?></option>
              <?php
							  }
						?>
            </select>
            <select name="city" id="city" onChange="loadArea(this.value, 'district')" style="height:30px; border:1px solid ">
              <option value="-1">--请选择城市--</option>
              <?php
                    	
                        foreach($city as $v){
						?>
              <option value="<?php echo $v["area_id"]?>" <?php if($userInfoList["city"]==$v["area_id"]){?> selected="selected"<?php }?>><?php echo $v["area_name"]?></option>
              <?php
							  }
							
						?>
            </select>
            <select name="district" id="district" onChange="loadArea(this.value, 'null')" style="height:30px; border:1px solid ">
              <option value="-1">--请选择地区--</option>
              <?php
                     
                        foreach($district as $v){
						?>
              <option value="<?php echo $v["area_id"]?>" <?php if($userInfoList["district"]==$v["area_id"]){?> selected="selected"<?php }?>><?php echo $v["area_name"]?></option>
              <?php
							  }
							
						?>
            </select></td>
        </tr>
        <tr>
          <td class="tdAlignRight">地址：</td>
          <td><input type="text" name="address" id="address" value="{$userInfoList[address]}" class="input_2"  datatype="*"   nullmsg="请输入详细地址" errormsg="请输入详细地址！"/></td>
        </tr>
        <tr>
          <td class="tdAlignCen footTd" colspan="2"><button type="submit" class="subinput">提交</button></td>
        </tr>
      </table>
    </form>
  </div>
</div>
<script type="text/javascript">
            $(function() {
                $(".secuform").Validform({
                    tiptype: 4,
                    ajaxPost: true,
                    callback: function(data) {
                        if (data.status == '1') {
                            alert(data.info);
                            location.href = "{U('user/userInfocompany')}";
                        }else{
                            alert(data.info);
                        }
                    }
                });
                var sp = $(".toux img,#toux");
                sp.hover(function(){
                    $("#toux").stop().animate({bottom:0});
                },function(){
                    $("#toux").stop().animate({bottom:'-20px'});
                });
            });
        </script> 
{template /common/footer}